package day20240919;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/CurriculumLogin")
public class CurriculumLogin extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String username = req.getParameter("username");
        String password = req.getParameter("password");
        String yanzhengma = req.getParameter("yanzhengma");
        PrintWriter writer = resp.getWriter();
        writer.write("""
                <html>
                    """
                +
                username
                +
                """ 
                === 
                """
                +
                password
                +
                """
                === 
                """
                +
                yanzhengma
                +
                """
                </html>
                """);
    }
}
